/**
 * Created by SunLunatic on 2015/4/4.
 */
var common = require("../util/common");

exports.toPage = function(req, res){
    res.render("project/"+req.params.target, common.baseData(req, {}));
}


var tree = {
    1:[
        {"name":"暴风城", "id":5, "leaf":"false"},
        {"name":"藏宝海湾", "id":6},
        {"name":"银月城", "id":7},
        {"name":"激流堡", "id":8},
        {"name":"黑暗之门", "id":9}
    ],
    2:[
        {"name": "泰达希尔", "id":10},
        {"name": "羽月要塞", "id":11},
        {"name": "安其拉神庙", "id":12},
        {"name": "奥丹姆", "id":13}
    ],
    5:[
        {"name": "工匠区", "id":14},
        {"name": "交易区", "id":15, "disabled":"true"},
        {"name": "法师区", "id":16}
    ]
}
exports.loadTree = function(req, res){
    res.send(tree[req.body.parentId]||{});
}